package com.prs.crm.domain.crm;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.Cascade;

import com.prs.crm.domain.Attachment;
import com.prs.crm.domain.FlowCodeEntity;

@Entity
@Table(name = "crm_mainBill")
public class mainBill extends FlowCodeEntity {
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Integer id;

	/**
	 * 单据编码
	 */

	private String billNum;

	private String currentTime;

	private String printtag;

	@Column(columnDefinition = "Integer(11) default '1'")
	private int printtagjug;

	@ManyToOne(fetch = FetchType.LAZY)
	@Cascade({ org.hibernate.annotations.CascadeType.ALL,
			org.hibernate.annotations.CascadeType.DELETE_ORPHAN })
	private Attachment attach;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getBillNum() {
		return billNum;
	}

	public void setBillNum(String billNum) {
		this.billNum = billNum;
	}

	public String getCurrentTime() {
		return currentTime;
	}

	public void setCurrentTime(String currentTime) {
		this.currentTime = currentTime;
	}

	public String getPrinttag() {
		return printtag;
	}

	public void setPrinttag(String printtag) {
		this.printtag = printtag;
	}

	public int getPrinttagjug() {
		return printtagjug;
	}

	public void setPrinttagjug(int printtagjug) {
		this.printtagjug = printtagjug;
	}

	public Attachment getAttach() {
		return attach;
	}

	public void setAttach(Attachment attach) {
		this.attach = attach;
	}

}
